package csel.controller.decoders;

import csel.controller.GameController;
import csel.controller.dispatchers.AbstractDispatcher;
import csel.controller.factories.ModelCommandFactory;
import csel.controller.factories.ViewCommandFactory;
import csel.controller.listeners.AreaViewActionListener;

/**
 * Reasons for Existence: Decodes actions in the area view, 
 * selects a dispatcher and command factory</br>
 * Team Members Responsible</br>
 * Implementation: Nik, Tait</br>
 * Testing: Nik, Tait</br>
 * 
 * @author Nikolas Wolfe
 */
public class AreaActionEventDecoder extends AbstractActionEventDecoder
{
	//constructor
	public AreaActionEventDecoder(AreaViewActionListener listener,
			AbstractDispatcher modelDispatcher,
			AbstractDispatcher viewDispatcher,
			ModelCommandFactory modelCommandFactory,
			ViewCommandFactory viewCommandFactory)
	{
		this.listener = listener;
		this.modelDispatcher = modelDispatcher;
		this.viewDispatcher = viewDispatcher;
		this.modelCommandFactory = modelCommandFactory;
		this.viewCommandFactory = viewCommandFactory;
	}

	//overrides the superclass and parses the action event so it can create the appropriate command
	@Override
	public void parseCommand()
	{
		String cmd = actionEvent.getActionCommand();
		if (false)
		{
		} else
		{
			if(GameController.infoMode)System.out.println("[CONTROLLER] " + cmd + " is not a valid command");
		}
	}
}
